<div class="row">
<style>
img{width:50px;border:none;}
.my_red{color:red;}
.my_green{color:green;}
</style>
<!-- 表示一个成功的或积极的动作 -->
<a href="javascript:void(0)"><button type="button" class="btn btn-primary active">资讯列表</button></a>
<a href="{:U('News/type')}"><button type="button" class="btn btn-primary">分类列表</button></a>
<a href="{:U('News/news')}"><button type="button" class="btn btn-primary">添加资讯</button></a>
<table class="table table-hover table-responsive">
   <thead>
      <tr>
         <th>标题</th>
         <th>分类</th>
         <th>标签</th>
         <th>描述</th>
         <th>操作</th>
      </tr>
   </thead>
   <tbody>
   <volist name="data" id="data">
      <tr>
         <td><span  data-toggle="tooltip" 
   data-placement="top" title="{$data.title}">{$data.title|mb_substr=0,14,'utf-8'}</span></td>
         <td>{$data.type}</td>
         <td><span title="{$data.tags}" data-toggle="tooltip" 
   data-placement="top">{$data.tags|mb_substr=0,12,'utf-8'}...</span></td>
         <td ><span title="{$data.desc}" data-toggle="tooltip" 
   data-placement="top">{$data.desc|mb_substr=0,20,'utf-8'}...</span></td>
         <td>
          <a href="{:U('Home/News/article',array('id'=>$data['nid']))}" target="_blank">查看</a>
          <a href="{:U('News/edit')}?id={$data.nid}">编辑</a>
          <a href="{:U('News/delete_news')}?id={$data.nid}" class="delete_news">删除</a>
          </td>
      </tr>
    </volist>
   </tbody>
</table>
{$page}
</div>
<script>
   $(function () { $("[data-toggle='tooltip']").tooltip(); });
   $(document).ready(function(){
	   $("#collect").click(function(){
		   $("#collect_form").submit();
	   });
	   $(".delete_news").click(function(){
		  if(!confirm('您确定要删除该资讯吗？删除之后将不能再恢复。')) return false;
	   });
   });
</script>








